package com.cq.school.entity;

import javax.persistence.*;
import java.lang.String;
import java.util.Date;

/**
 * Created with IntelliJ IDEA.
 * User: huke
 * Date: 13-11-27
 * Time: 下午10:39
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table(name = "article")
public class Article extends IdEntity {
    private String title;
    private String content;
    private int category;
    private String source;
    private String author;
    private int hits = 0;
    private Date pubDate;
    private Date createTime;
    private long schoolId;

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getCategory() {
        return category;
    }

    public void setCategory(int category) {
        this.category = category;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public int getHits() {
        return hits;
    }

    public void setHits(int hits) {
        this.hits = hits;
    }

    public Date getPubDate() {
        return pubDate;
    }

    public void setPubDate(Date pubDate) {
        this.pubDate = pubDate;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(updatable = false)
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public long getSchoolId() {
        return schoolId;
    }

    public void setSchoolId(long schoolId) {
        this.schoolId = schoolId;
    }
}
